CONTENTS | INDEX | PREV | NEXT
log10
flog10
NAME
log - return the log of the double quantity, base 10
flog - return the log of the float quantity, base 10
SYNOPSIS
#include <math.h>
double a = log10(b);
double b;
float c = flog10(d);
float d;
FUNCTION
Returns the log of the floating point quantity, base 10.
EXAMPLE
/*
* compile with the math library -lm
*/
#include <math.h>
#include <stdio.h>
main()
{
{
double a = log10(0.25);
printf("log10 0.25 = %lfn", a); /* -0.6021 */
}
{ /* less accuracy */
float a = flog10(0.25);
printf("log10 0.25 = %lfn", (double)a);
}
return(0);
}
INPUTS
double b; double floating point value
float d; float floating point value
RESULTS
double a; result double floating point value
float c; result float floating point value